<template>
  <a-modal v-model="show" width="80%" @ok="handleOk" centered style="overflow: auto;">
    <h2>{{ form.type === 1 ? "查看招商信息" : "查看招标信息" }}</h2>
    <div class="main mt-40">
      <a-form-model ref="ruleForm" :model="form" :label-col="labelCol" :wrapper-col="wrapperCol">
        <a-form-model-item ref="title" label="标题" prop="title">
          <a-input :disabled="true" v-model="form.title" placeholder="请输入：园区招商、办公地点招商、厂房招租等内容" />
        </a-form-model-item>

        <a-form-model-item label="来源" prop="link">
          <a-input :disabled="true" v-model="form.link" />
        </a-form-model-item>
        <a-form-model-item label="摘要" prop="remark">
          <a-input :disabled="true" v-model="form.remark" type="textarea" />
        </a-form-model-item>
        <a-form-model-item label="内容" class="content-cls">
          <editor-bar :disabled="true" v-model="form.profile" placeholder="请输入招商计划内容"
            :openNullCheck="true"></editor-bar>
        </a-form-model-item>



      </a-form-model>
    </div>
    <template slot="footer">
      <a-button type="primary" @click="handleOk">关闭</a-button>
    </template>
  </a-modal>
</template>

<script>
import EditorBar from "@/components/wangEnduit/index.vue";
export default {
  components: { EditorBar },
  props: {
    form: {
      type: Object,
      default () {
        return {}
      }
    },

    show: {
      type: Boolean,
      default: false
    },
    container: {
      type: Object,
      default: null
    }
  },
  data () {
    return {
      labelCol: { span: 2 },
      wrapperCol: { span: 20 },
    }
  },
  methods: {
    handleOk () {
      this.$emit('close')
    },
    getContainer () {
      if (this.form.type === 1) {
        return document.querySelector('#zhaoshang')
      }

      return document.querySelector('#zhaobiao')
    }
  }
}


</script>

<style lang="less" scoped>
.ant-input[disabled] {
  background-color: #fff;
  color: #000;
}

/deep/.text {
  min-height: 300px;
}

h2 {
  font-size: 22px;
  color: #303133;
  font-weight: 700;
  padding-bottom: 14px;
  border-bottom: solid 1px #e9e9e9;
}

html {
  overflow: auto;
}
</style>